import { defineStore } from 'pinia'

export const Usestore = defineStore('count', {
    state: () => {
        return {
            name: '',
            age: 19,
            obj: { money: 200, ss: 11 }
        }
    },
    getters: {
        gettable(state) {
            return state.age * 2
        }
    },
    actions: {
        getlist(name: string, age: number, data: any) {
            this.name = name
            this.age = age
            //               
            this.obj = { ...this.obj, ...data }
        }
    }

})